﻿//这个类主要用于绘制扇形绘制
//author 夏天的树人
//vesion 1.0
//绘制扇形

package org.summerTree.graphics
{
	import flash.display.Graphics;
	import flash.geom.Point;
	import flash.display.Sprite;

	public class Sector extends Base 
	{
		//private var LineColor:uint=0x000000;//默认颜色
		public function Sector()
		{

		}
		
		override public function clone():*
		{
			return new Sector();
		}
		
		public function CreatSector(radius:Number,startAngle:Number,endAngle:Number,fillcolor:uint=0xffffff,alpha:Number=1):void
		{
			this.graphics.lineStyle(1,color);
			this.graphics.moveTo(0,0);
			this.graphics.beginFill(fillcolor,alpha);
			for (var i:int=startAngle; i<=endAngle; i++)
			{
				this.graphics.lineTo(radius*Math.cos(-i*Math.PI/180),radius*Math.sin(-i*Math.PI/180));
			}
			this.graphics.endFill();
			this.graphics.lineTo(0,0);
		}
		
		//public function clear():void
//		{
//			this.graphics.clear();
//		}
		
		////设置颜色
//		public function set color(value:uint):void
//		{
//			this.LineColor=value;
//		}
//		//获取颜色
//		public function get color():uint
//		{
//			return this.LineColor;
//		}
	}
}